@charset "utf-8";
/**
 * Created by younger on 2016/03/06.
 */

@mixin pagination(
  $padding:5px 15px,
  $border-radius:3px,
  $font-size:1em,
  $line-height:1em,
  $border:#ccc,
  $color:inherit,
  $bg:#666,
  //hover
  $hover-color:inherit,
  $hover-bg:linear-gradient(#ddd -30%, #fafafa, #ddd),
  $hover-border:#666,
  //active
  $active-color:#666,
  $active-bg:linear-gradient(#ddd -30%, #fafafa, #ddd),
  $active-border-color:#666,
  //disable
  $disabled-color:#000,
  $disabled-bg:#ccc,
  $disabled-border-color:#000,
  $cursor-disabled:not-allowed
) {
  display: inline-block;
  padding-left: 0;
  margin: $line-height 0;
  border-radius: $border-radius;

  > li {
    display: inline; // Remove list-style and block-level defaults
    > a,
    > span {
      position: relative;
      float: left; // Collapse white-space
      padding: $padding;
      line-height: $line-height;
      text-decoration: none;
      color: $color;
      background: $bg;
      border: 1px solid $border;
      margin-left: -1px;
    }
  }

  > li > a {
    &:hover,
    &:focus {
      z-index: 2;
      color: $hover-color;
      //background: $hover-bg;
      border-color: $hover-border;
      //  添加阴影
      box-shadow: inset 0 0 3.6px 1px #cccccc;
    }
  }

  > .active > a {
    &,
    &:hover,
    &:focus {
      z-index: 3;
      color: $active-color;
      background: $active-bg;
      border-color: $active-border-color;
      cursor: default;
    }
  }

  > .disabled {
    > a,
    > a:hover,
    > a:focus {
      color: $disabled-color;
      background-color: $disabled-bg;
      border-color: $disabled-border-color;
      cursor: $cursor-disabled;
    }
  }
}
